package joc.nextgen;

import static joc.nextgen.JOC.post;
import static joc.nextgen.JOC.result;

public class RicherTimeOfDayContract extends RicherTimeOfDay {
	@Override
	public int nearestHour() {
		if (post()) {
			if (getMinute() < 30) {
				assert result(int.class) == getHour();
			} else if (getHour() < 23) {
				assert result(int.class) == getHour() + 1;
			} else {
				assert result(int.class) == 0;
			}
		}
		return 0;
	}
}
